import { createApp, h } from 'vue';
import 'vue-toastification/dist/index.css';
import Toast, { POSITION, useToast } from 'vue-toastification';
import { PluginOptions } from 'vue-toastification/src/types';

/**
 * 安装element-plus组件
 * @param app 要安装的app
 */
function installToast (app: ReturnType<typeof createApp>) {
  const options: PluginOptions = {
    position: POSITION.TOP_CENTER,
    timeout: 3000
  };
  app.use(Toast, options);
}
export default installToast;
